Content Lake API
Content Lake API Documentation
Version: 1.0.1
Paths
/cl/api/v1/health/
- Method: GET
- Summary: Health
- Description: Return Health Status. :return:
- Operation ID: health_cl_api_v1_health__get
- Responses:
- 200:
- Description: Successful Response
- Content-Type: application/json
- 200:
/cl/api/v1/objects/
Get All Objects From The Repository API
/cl/api/v1/objects/
- Method:
GET
- Summary: Get All Objects From The Repository
- Description: Return a list of all the objects that are present in the object repository.
- Operation ID: Get_all_objects_from_the_repository_cl_api_v1_objects__get
Request Payload:
Type | Parameter | Description | Data Type | is_optional |
---|---|---|---|---|
Query Parameter | folder_id | Identifier of a folder within a hierarchical structure. | string | mandatory |
Query Parameter | page_no | Specifies the page number to retrieve (1-based index). | int | mandatory |
Query Parameter | page_size | Specifies the number of items per page. | int | mandatory |
Parameter | sorting_by | Sort result by title or modified_date | string | Optional |
Parameter | order | Sort result in ascending or descending order | string | mandatory (Default - Asc) |
Parameter | object_type | List of object types, Object types - Document, Audio, Video, Image, Course, Rubric, Assessment, Assignment, Question, ExternalTool, Glossary, DiscussionForum, Page, Quiz | string | Optional |
Note -
order -
Users should be able to specify whether the sorting should be in ascending or descending order. Ascending order sorts the objects from the lowest value to the highest, while descending order sorts from the highest value to the lowest.
object_type-
The API endpoint for retrieving all objects is accept filtering parameters based on object type. Users is be able to specify one or more object types to filter the returned objects.
sorting_by
The API endpoint for retrieving all objects is accept sorting parameters. Sorting parameters should include fields such as Title and Modified date.
sample code
import requests
URL = "https://api.kadal.ai/cl/api/v1/objects/"
# sample python code
headers = { "Authorization ": "Bearer 1234567890" }
params={
"folder_id":"string",
"sorting_by":"string",
"order":"asc/desc",
"object_type":"array",
"page_size":int,
"ext_user_id_ref":"string"
}
response = requests.get(URL, headers=headers,params=params)
print(response)
Example response -
{
"message": "string",
"data": {
"total": 0,
"records": [
{
"object_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version_no": 1,
"version_label": "string",
"tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"object_type": "string",
"title": "string",
"description": "string",
"file_name": "string",
"file_extension": "string",
"size": 0,
"mimetype": "string",
"uri": "string",
"asset_location": "string",
"default_asset_thumbnail": "string",
"created_at": "2024-05-09T10:53:50.953Z",
"updated_at": "2024-05-09T10:53:50.953Z",
"deleted_at": "2024-05-09T10:53:50.953Z",
"created_by_name": "string",
"created_by_user_id": "string",
"created_by_user_type": "string",
"updated_by_name": "string",
"deleted_by_name": "string",
"is_latest_version": false,
"is_deleted": false,
"is_private": false,
"is_lga": "string",
"source": "string",
"tags": [
"string"
],
"kvp": {},
"taxonomy": [
{
"uuid": "string",
"title": "string"
}
],
"folders": [
"string"
],
"repos": [
"string"
],
"media": {
"height": 0,
"width": 0,
"audio_video_duration": 0,
"audio_description_text": "string",
"alt_text": "string",
"thumbnail": "string",
"streamingDetails": {
"resolution": "string",
"url": "string",
"label": "string"
},
"transcriptionDetails": {
"language": "string",
"url": "string",
"label": "string"
}
},
"usage_count": 0,
"license_expiration_date": "2024-05-09T10:53:50.954Z",
"license_validity": true,
"chunk_metadata": {},
"score": 0,
"content": ""
}
],
"aggregations": {}
}
}
Responses:
Status Code | Description | Content-Type |
---|---|---|
200 | Successful Response | application/json |
404 | Object not found | application/json |
400 | Bad Request | application/json |
500 | Internal server error | application/json |
422 | Validation Error | application/json |
- 200 (Successful Response): This response indicates a successful retrieval of all objects in the repository.
- 404 (Object not found): This response indicates that the requested objects are not found in the repository.
- 400 (Bad Request): This response indicates that the request is invalid or malformed.
- 500 (Internal server error): This response indicates an unexpected server error occurred while processing the request.
- 422 (Validation Error): This response indicates that there are validation errors with the request parameters.
Get All Objects From The Repository API (POST API V2)
/cl/api/v2/objects/
- Method:
POST
- Summary: Get All Objects From The Repository
- Description: Return a list of all the objects that are present in the object repository.
- Operation ID: Get_all_objects_from_the_repository_cl_api_v1_objects__get
Request Payload:
Type | Parameter | Description | Data Type | is_optional |
---|---|---|---|---|
Query Parameter | folder_id | Identifier of a folder within a hierarchical structure. | string | optional |
Query Parameter | page_no | Specifies the page number to retrieve (1-based index). | int | optional |
Query Parameter | page_size | Specifies the number of items per page. | int | optional |
Parameter | sorting_by | Sort result by title or modified_date | string | Optional |
Parameter | order | Sort result in ascending or descending order | string | optional (Default - Asc) |
Parameter | object_type | List of object types, Object types - Document, Audio, Video, Image, Course, Rubric, Assessment, Assignment, Question, ExternalTool, Glossary, DiscussionForum, Page, Quiz | string | Optional |
Query Parameter | object_ids | List of object IDs | List of UUId | optional |
Query Parameter | folder_ids | List of folder IDs | List of UUId | optional |
Query Parameter | object_types | List of object types | string | optional |
Query Parameter | file_extension | File extension | string | optional |
Query Parameter | created_by | Creator of the object | string | optional |
Query Parameter | updated_by | Last updater of the object | string | optional |
Query Parameter | source | Source of the object | string | optional |
Query Parameter | repos | Repository associated with the object | string | optional |
Query Parameter | is_private | Indicates if the object is private | boolean | optional |
Query Parameter | ext_user_id_ref | External user ID reference | string | optional |
Note -
order -
Users should be able to specify whether the sorting should be in ascending or descending order. Ascending order sorts the objects from the lowest value to the highest, while descending order sorts from the highest value to the lowest.
object_type-
The API endpoint for retrieving all objects is accept filtering parameters based on object type. Users is be able to specify one or more object types to filter the returned objects.
sorting_by
The API endpoint for retrieving all objects is accept sorting parameters. Sorting parameters should include fields such as Title and Modified date.
sample code
import requests
URL = "https://api.kadal.ai/cl/api/v2/objects/"
# sample python code
headers = { "Authorization ": "Bearer 1234567890" }
params:{
"code": "string",
"version_label": "string",
"object_type": "Document",
"title": "string",
"description": "string",
"file_name": "string",
"file_extension": "string",
"uri": "string",
"tags": [
"string"
],
"kvp": {},
"taxonomy": [
{
"uuid": "string",
"title": "string"
}
],
"repos": [
"string"
],
"folders": [
"string"
],
"source": "string",
"is_private": False,
"is_lga": "G",
"is_deleted": False,
"license_expiration_date": "2024-08-21T17:50:41.351Z",
"license_validity": True,
"created_by_name": "string",
"metadata": {},
"media": {}
}
response = requests.post(URL, headers=headers,params=params)
print(response)
Example response -
{
"message": "string",
"data": {
"total": 0,
"records": [
{
"object_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version_no": 1,
"version_label": "string",
"tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"object_type": "string",
"title": "string",
"description": "string",
"file_name": "string",
"file_extension": "string",
"size": 0,
"mimetype": "string",
"uri": "string",
"asset_location": "string",
"default_asset_thumbnail": "string",
"created_at": "2024-06-28T09:20:23.236Z",
"updated_at": "2024-06-28T09:20:23.236Z",
"deleted_at": "2024-06-28T09:20:23.236Z",
"created_by_name": "string",
"created_by_user_id": "string",
"created_by_user_type": "string",
"updated_by_name": "string",
"deleted_by_name": "string",
"is_latest_version": false,
"is_deleted": false,
"is_private": false,
"is_lga": "string",
"source": "string",
"tags": [
"string"
],
"kvp": {},
"taxonomy": [
{
"uuid": "string",
"title": "string"
}
],
"folders": [
"string"
],
"repos": [
"string"
],
"media": {},
"usage_count": 0,
"license_expiration_date": "2024-06-28T09:20:23.236Z",
"license_validity": true,
"score": 0,
"content": ""
}
],
"aggregations": {}
}
}
Responses:
Status Code | Description | Content-Type |
---|---|---|
200 | Successful Response | application/json |
404 | Object not found | application/json |
400 | Bad Request | application/json |
500 | Internal server error | application/json |
422 | Validation Error | application/json |
- 200 (Successful Response): This response indicates a successful retrieval of all objects in the repository.
- 404 (Object not found): This response indicates that the requested objects are not found in the repository.
- 400 (Bad Request): This response indicates that the request is invalid or malformed.
- 500 (Internal server error): This response indicates an unexpected server error occurred while processing the request.
- 422 (Validation Error): This response indicates that there are validation errors with the request parameters.
Create A New Object In The Repository API
/cl/api/v1/objects/
- Method:
POST
- Summary: Create A New Object In The Repository
- Description: Create a new object in the object repository.
- Operation ID: Create_a_new_object_in_the_repository_cl_api_v1_objects__post
Request Payload:
Type | Parameter | Description | Data Type | is_optional |
---|---|---|---|---|
Query Parameter | code | ID or code for the document | string | optional |
Query Parameter | version_label | Label or identifier for the version of the document | string | optional |
Query Parameter | object_type | Type of the object (e.g., "Document") | string | mandatory |
Query Parameter | title | Title or name of the document | string | optional |
Query Parameter | description | Description or summary of the document | string | optional |
Query Parameter | file_name | Name of the file associated with the document | string | optional |
Query Parameter | file_extension | File extension of the associated file | string | optional |
Query Parameter | uri | Uniform Resource Identifier (URI) for accessing the document | string | mandatory |
Query Parameter | tags | List of tags associated with the document | array of strings | optional |
Query Parameter | kvp | Key-value pairs for additional metadata | object | optional |
Query Parameter | taxonomy | Taxonomy information related to the document | array of objects | optional |
Query Parameter | repos | List of repositories where the document is stored | array of strings | optional |
Query Parameter | folders | List of folders where the document is organized | array of strings | optional |
Query Parameter | source | Source or origin of the document | string | mandatory |
Query Parameter | is_private | Flag indicating if the document is private (true) or public (false) | boolean | optional |
Query Parameter | is_lga | Flag indicating if the document is subject to Local Government Access (LGA) | string (e.g., "G" for Yes) | optional |
Query Parameter | is_latest_version | Flag indicating if this is the latest version of the document | boolean | optional |
Query Parameter | is_deleted | Flag indicating if the document has been deleted (true) or not (false) | boolean | optional |
Query Parameter | license_expiration_date | Expiration date of the document's license | string (ISO 8601 format) | optional |
Query Parameter | license_validity | Flag indicating the validity of the document's license (true/false) | boolean | optional |
Query Parameter | created_by_name | Name of the user who created the document | string | optional |
Query Parameter | metadata | Additional metadata associated with the document | optional | |
Query Parameter | folder_id | Identifier of a folder within a hierarchical structure | string | optional |
Query Parameter | page_no | Specifies the page number to retrieve (1-based index) | int | optional |
Query Parameter | page_size | Specifies the number of items per page | int | optional |
Example response -
{
"status": "string",
"message": "string",
"data": {
"object_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version_no": 1,
"version_label": "string",
"tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"object_type": "string",
"title": "string",
"description": "string",
"file_name": "string",
"file_extension": "string",
"size": 0,
"mimetype": "string",
"uri": "string",
"asset_location": "string",
"default_asset_thumbnail": "string",
"created_at": "2024-05-09T10:57:58.376Z",
"updated_at": "2024-05-09T10:57:58.376Z",
"deleted_at": "2024-05-09T10:57:58.376Z",
"created_by_name": "string",
"created_by_user_id": "string",
"created_by_user_type": "string",
"updated_by_name": "string",
"deleted_by_name": "string",
"is_latest_version": false,
"is_deleted": false,
"is_private": false,
"is_lga": "string",
"source": "string",
"tags": [
"string"
],
"kvp": {},
"taxonomy": [
{
"uuid": "string",
"title": "string"
}
],
"folders": [
"string"
],
"repos": [
"string"
],
"media": {
"height": 0,
"width": 0,
"audio_video_duration": 0,
"audio_description_text": "string",
"alt_text": "string",
"thumbnail": "string",
"streamingDetails": {
"resolution": "string",
"url": "string",
"label": "string"
},
"transcriptionDetails": {
"language": "string",
"url": "string",
"label": "string"
}
},
"usage_count": 0,
"license_expiration_date": "2024-05-09T10:57:58.376Z",
"license_validity": true,
"chunk_metadata": {}
}
}
Responses:
Status Code | Description | Content-Type |
---|---|---|
200 | Successful Response | application/json |
404 | Object not found | application/json |
400 | Bad Request | application/json |
500 | Internal server error | application/json |
422 | Validation Error | application/json |
- 200 (Successful Response): This response indicates successful creation of a new object in the repository.
- 404 (Object not found): This response indicates that the requested objects are not found in the repository.
- 400 (Bad Request): This response indicates that the request is invalid or malformed.
- 500 (Internal server error): This response indicates an unexpected server error occurred while processing the request.
- 422 (Validation Error): This response indicates that there are validation errors with the request parameters.
Get Object Details For An Object ID API
/cl/api/v1/objects/{object_id}
- Method:
GET
- Summary: Get Object Details For An Object Id
- Description: Return object details from the object repository for the specified object ID.
- Operation ID: Get_Object_details_for_an_object_Id_cl_api_v1_objectsobject_idget
Request Payload:
Type | Parameter | Description | Data Type | is_optional |
---|---|---|---|---|
Query Parameter | object_id | ID of an object | string | mandatory |
sample code
import requests
URL = "https://api.kadal.ai/cl/api/v1/objects/{object_id}"
# sample python code
headers = { "Authorization ": "Bearer 1234567890" }
params={
"object_id":"string"
}
response = requests.get(URL, headers=headers,params=params)
print(response)
Example response -
{
"status": "string",
"message": "string",
"data": {
"object_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version_no": 1,
"version_label": "string",
"tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"object_type": "string",
"title": "string",
"description": "string",
"file_name": "string",
"file_extension": "string",
"size": 0,
"mimetype": "string",
"uri": "string",
"asset_location": "string",
"default_asset_thumbnail": "string",
"created_at": "2024-05-09T10:59:01.600Z",
"updated_at": "2024-05-09T10:59:01.600Z",
"deleted_at": "2024-05-09T10:59:01.600Z",
"created_by_name": "string",
"created_by_user_id": "string",
"created_by_user_type": "string",
"updated_by_name": "string",
"deleted_by_name": "string",
"is_latest_version": false,
"is_deleted": false,
"is_private": false,
"is_lga": "string",
"source": "string",
"tags": [
"string"
],
"kvp": {},
"taxonomy": [
{
"uuid": "string",
"title": "string"
}
],
"folders": [
"string"
],
"repos": [
"string"
],
"media": {
"height": 0,
"width": 0,
"audio_video_duration": 0,
"audio_description_text": "string",
"alt_text": "string",
"thumbnail": "string",
"streamingDetails": {
"resolution": "string",
"url": "string",
"label": "string"
},
"transcriptionDetails": {
"language": "string",
"url": "string",
"label": "string"
}
},
"usage_count": 0,
"license_expiration_date": "2024-05-09T10:59:01.600Z",
"license_validity": true,
"chunk_metadata": {}
}
}
Responses:
Status Code | Description | Content-Type |
---|---|---|
200 | Successful Response | application/json |
404 | Object not found | application/json |
400 | Bad Request | application/json |
500 | Internal server error | application/json |
422 | Validation Error | application/json |
- 200 (Successful Response): This response indicates successful retrieval of object details for the specified object ID.
- 404 (Object not found): This response indicates that the requested object ID does not exist in the repository.
- 400 (Bad Request): This response indicates that the request is invalid or malformed.
- 500 (Internal server error): This response indicates an unexpected server error occurred while processing the request.
- 422 (Validation Error): This response indicates that there are validation errors with the request parameters.
Update Object In The Repository API
/cl/api/v1/objects/{object_id}
- Method:
PUT
- Summary: Update A Object In The Repository
- Description: Update the latest version of an object in the object repository based on the object ID.
- Operation ID: Update_a_object_in_the_repository_cl_api_v1_objectsobject_idput
Request Payload:
Type | Parameter | Description | Data Type | is_optional |
---|---|---|---|---|
Parameter | object_id | Object_id of an existing object to be updated | string | mandatory |
Parameter | create_new_version | Create a new version of the object | string | mandatory |
Query Parameter | version_label | Type of the object (e.g., "Document") | string | mandatory |
Query Parameter | title | Title or name of the document | string | mandatory |
Query Parameter | description | Description or summary of the document | string | mandatory |
Query Parameter | uri | Uniform Resource Identifier (URI) for accessing the document | string | mandatory |
Query Parameter | is_private | Flag indicating if the document is private (true) or public (false) | boolean | mandatory |
Query Parameter | is_lga | Flag indicating if the document is subject to Local Government Access (LGA) | string | mandatory |
Query Parameter | source | Source or origin of the document | string | mandatory |
Query Parameter | tags | List of tags associated with the document | array of strings | optional |
Query Parameter | kvp | Key-value pairs for additional metadata | object | optional |
Query Parameter | taxonomy | Taxonomy information related to the document | array of objects | optional |
Query Parameter | folders | List of folders where the document is organized | array of strings | optional |
Query Parameter | repos | List of repositories where the document is stored | array of strings | optional |
Query Parameter | license_expiration_date | Expiration date of the document's license | string (ISO 8601 format) | mandatory |
Query Parameter | license_validity | Flag indicating the validity of the document's license (true/false) | boolean | mandatory |
Query Parameter | chunk_metadata | Additional metadata associated with document chunks | object | optional |
sample code
import requests
URL = "https://api.kadal.ai/cl/api/v1/objects/{object_id}"
# sample python code
headers = { "Authorization ": "Bearer 1234567890" }
params={
"version_label": "string",
"object_type": "Document",
"title": "string",
"description": "string",
"uri": "string",
"is_private": False,
"is_lga": "string",
"source": "string",
"tags": [
"string"
],
"kvp": {},
"taxonomy": [
{
"uuid": "string",
"title": "string"
}
],
"folders": [
"string"
],
"repos": [
"string"
],
"license_expiration_date": "2024-08-21T17:53:55.939Z",
"license_validity": True,
"media": {}
}
response = requests.put(URL, headers=headers,params=params)
print(response)
Responses:
Status Code | Description | Content-Type |
---|---|---|
200 | Successful Response | application/json |
422 | Validation Error | application/json |
- 200 (Successful Response): This response indicates that the object was successfully updated in the repository.
- 422 (Validation Error): This response indicates that there are validation errors with the request parameters.
Delete Object From The Repository API
/cl/api/v1/objects/{object_id}
- Method:
DELETE
- Summary: Delete A Object From The Repository
- Description: Delete an object from the object repository based on the object ID.
- Operation ID: Delete_a_object_from_the_repository_cl_api_v1_objectsobject_iddelete
Request Payload:
Type | Parameter | Description | Data Type | is_optional |
---|---|---|---|---|
Query Parameter | object_id | ID of an object | string | mandatory |
sample code
import requests
URL = "https://api.kadal.ai/cl/api/v1/objects/{object_id}"
# sample python code
headers = { "Authorization ": "Bearer 1234567890" }
params={
"object_id":"string"
}
response = requests.delete(URL, headers=headers,params=params)
print(response)
Example response -
{
"status": "string",
"message": "string",
"data": {
"object_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version_no": 1,
"version_label": "string",
"tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"object_type": "string",
"title": "string",
"description": "string",
"file_name": "string",
"file_extension": "string",
"size": 0,
"mimetype": "string",
"uri": "string",
"asset_location": "string",
"default_asset_thumbnail": "string",
"created_at": "2024-05-09T11:07:18.381Z",
"updated_at": "2024-05-09T11:07:18.381Z",
"deleted_at": "2024-05-09T11:07:18.381Z",
"created_by_name": "string",
"created_by_user_id": "string",
"created_by_user_type": "string",
"updated_by_name": "string",
"deleted_by_name": "string",
"is_latest_version": false,
"is_deleted": false,
"is_private": false,
"is_lga": "string",
"source": "string",
"tags": [
"string"
],
"kvp": {},
"taxonomy": [
{
"uuid": "string",
"title": "string"
}
],
"folders": [
"string"
],
"repos": [
"string"
],
"media": {
"height": 0,
"width": 0,
"audio_video_duration": 0,
"audio_description_text": "string",
"alt_text": "string",
"thumbnail": "string",
"streamingDetails": {
"resolution": "string",
"url": "string",
"label": "string"
},
"transcriptionDetails": {
"language": "string",
"url": "string",
"label": "string"
}
},
"usage_count": 0,
"license_expiration_date": "2024-05-09T11:07:18.382Z",
"license_validity": true,
"chunk_metadata": {}
}
}
Responses:
Status Code | Description | Content-Type |
---|---|---|
200 | Successful Response | application/json |
404 | Object not found | application/json |
400 | Bad Request | application/json |
500 | Internal server error | application/json |
422 | Validation Error | application/json |
- 200 (Successful Response): This response indicates that the object was successfully deleted from the repository.
- 404 (Object not found): This response indicates that the specified object ID was not found in the repository.
- 400 (Bad Request): This response indicates that there was a problem with the request syntax or parameters.
- 500 (Internal server error): This response indicates an unexpected server error occurred.
- 422 (Validation Error): This response indicates that there are validation errors with the request parameters.
Get Object Details For a Specific Version API
/cl/api/v1/objects/{object_id}/versions/{version_id}
- Method:
GET
- Summary: Get Object Details For An Object Id For A Specific Version
- Description: Retrieve details for a specific version of an object from the object repository based on the object ID and version ID.
- Operation ID: Get_Object_details_for_an_object_Id_for_a_specific_version_cl_api_v1_objectsobject_idversionsversion_idget
Request Payload:
Type | Parameter | Description | Data Type | is_optional |
---|---|---|---|---|
Query Parameter | object_id | Object_id of an existing object. | string | mandatory |
Query Parameter | version_id | Version_id of the existing object. | string | mandatory |
sample code
import requests
URL = "https://api.kadal.ai/cl/api/v1/objects/{object_id}/versions/{version_id}"
# sample python code
headers = { "Authorization ": "Bearer 1234567890" }
params={
"object_id":"string",
"version_id":"string"
}
response = requests.get(URL, headers=headers,params=params)
print(response)
Example response -
{
"status": "string",
"message": "string",
"data": {
"object_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version_no": 1,
"version_label": "string",
"tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"object_type": "string",
"title": "string",
"description": "string",
"file_name": "string",
"file_extension": "string",
"size": 0,
"mimetype": "string",
"uri": "string",
"asset_location": "string",
"default_asset_thumbnail": "string",
"created_at": "2024-05-09T11:09:37.863Z",
"updated_at": "2024-05-09T11:09:37.863Z",
"deleted_at": "2024-05-09T11:09:37.863Z",
"created_by_name": "string",
"created_by_user_id": "string",
"created_by_user_type": "string",
"updated_by_name": "string",
"deleted_by_name": "string",
"is_latest_version": false,
"is_deleted": false,
"is_private": false,
"is_lga": "string",
"source": "string",
"tags": [
"string"
],
"kvp": {},
"taxonomy": [
{
"uuid": "string",
"title": "string"
}
],
"folders": [
"string"
],
"repos": [
"string"
],
"media": {
"height": 0,
"width": 0,
"audio_video_duration": 0,
"audio_description_text": "string",
"alt_text": "string",
"thumbnail": "string",
"streamingDetails": {
"resolution": "string",
"url": "string",
"label": "string"
},
"transcriptionDetails": {
"language": "string",
"url": "string",
"label": "string"
}
},
"usage_count": 0,
"license_expiration_date": "2024-05-09T11:09:37.863Z",
"license_validity": true,
"chunk_metadata": {}
}
}
Responses:
Status Code | Description | Content-Type |
---|---|---|
200 | Successful Response | application/json |
404 | Object not found | application/json |
400 | Bad Request | application/json |
500 | Internal server error | application/json |
422 | Validation Error | application/json |
- 200 (Successful Response): This response indicates that the object details for the specified version were successfully retrieved.
- 404 (Object not found): This response indicates that the specified object ID or version ID was not found in the repository.
- 400 (Bad Request): This response indicates that there was a problem with the request syntax or parameters.
- 500 (Internal server error): This response indicates an unexpected server error occurred.
- 422 (Validation Error): This response indicates that there are validation errors with the request parameters.
Update New Version File For Object API
/cl/api/v1/objects/{object_id}/versions/{version_id}/uploadfile
- Method:
PUT
- Summary: Update A New Version File For Object In The Object Repository
- Description: Update a new version file for an object in the object repository.
- Operation ID: Update_a_new_version_file_for_object_in_the_object_repositorycl_api_v1_objectsobject_idversionsversion_id__uploadfile_put
Request Payload:
Type | Parameter | Description | Data Type | is_optional |
---|---|---|---|---|
Query Parameter | object_id | Object_id of an existing object. | string | mandatory |
Query Parameter | version_id | Version_id of the existing object. | string | mandatory |
Query Parameter | auto_chunk | Auto chunk the file | string | mandatory |
Query Parameter | file | File to be uploaded in the repository | string | mandatory |
sample code
import requests
URL = "https://api.kadal.ai/cl/api/v1/objects/{object_id}/versions/{version_id}/uploadfile"
# sample python code
headers = { "Authorization ": "Bearer 1234567890" }
params={
"object_id":"string",
"version_id":"string",
"auto_chunk":"string",
"file":"string"
}
response = requests.put(URL, headers=headers,params=params)
print(response)
Example response -
{
"status": "string",
"message": "string",
"data": {
"object_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version_no": 1,
"version_label": "string",
"tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"object_type": "string",
"title": "string",
"description": "string",
"file_name": "string",
"file_extension": "string",
"size": 0,
"mimetype": "string",
"uri": "string",
"asset_location": "string",
"default_asset_thumbnail": "string",
"created_at": "2024-05-09T11:11:55.448Z",
"updated_at": "2024-05-09T11:11:55.448Z",
"deleted_at": "2024-05-09T11:11:55.448Z",
"created_by_name": "string",
"created_by_user_id": "string",
"created_by_user_type": "string",
"updated_by_name": "string",
"deleted_by_name": "string",
"is_latest_version": false,
"is_deleted": false,
"is_private": false,
"is_lga": "string",
"source": "string",
"tags": [
"string"
],
"kvp": {},
"taxonomy": [
{
"uuid": "string",
"title": "string"
}
],
"folders": [
"string"
],
"repos": [
"string"
],
"media": {
"height": 0,
"width": 0,
"audio_video_duration": 0,
"audio_description_text": "string",
"alt_text": "string",
"thumbnail": "string",
"streamingDetails": {
"resolution": "string",
"url": "string",
"label": "string"
},
"transcriptionDetails": {
"language": "string",
"url": "string",
"label": "string"
}
},
"usage_count": 0,
"license_expiration_date": "2024-05-09T11:11:55.449Z",
"license_validity": true,
"chunk_metadata": {}
}
}
Responses:
Status Code | Description | Content-Type |
---|---|---|
200 | Successful Response | application/json |
404 | Object not found | application/json |
400 | Bad Request | application/json |
500 | Internal server error | application/json |
422 | Validation Error | application/json |
- 200 (Successful Response): This response indicates that the new version file for the object was successfully updated.
- 404 (Object not found): This response indicates that the specified object ID or version ID was not found in the repository.
- 400 (Bad Request): This response indicates that there was a problem with the request syntax or parameters.
- 500 (Internal server error): This response indicates an unexpected server error occurred.
- 422 (Validation Error): This response indicates that there are validation errors with the request parameters.
Update File For Object API
/cl/api/v1/objects/{object_id}/uploadfile
Method:
PUT
Summary: Update The File For Object In The Object Repository
Description: Update the file for an object in the object repository.
Operation ID: Update_the_file_for_object_in_the_object_repositorycl_api_v1_objectsobject_id__uploadfile_put
Request Payload:
Type | Parameter | Description | Data Type | is_optional |
---|---|---|---|---|
Query Parameter | object_id | Object_id of an existing object. | string | mandatory |
Query Parameter | auto_chunk | Auto chunk the file | string | mandatory |
Query Parameter | file | File to be uploaded in the repository | string | mandatory |
sample code
import requests
URL = "https://api.kadal.ai/cl/api/v1/objects/{object_id}/versions/{version_id}/uploadfile"
# sample python code
headers = { "Authorization ": "Bearer 1234567890" }
params={
"object_id":"string",
"auto_chunk":"string",
"file":"string"
}
response = requests.put(URL, headers=headers,params=params)
print(response)
Example response -
{
"status": "string",
"message": "string",
"data": {
"object_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version_no": 1,
"version_label": "string",
"tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"object_type": "string",
"title": "string",
"description": "string",
"file_name": "string",
"file_extension": "string",
"size": 0,
"mimetype": "string",
"uri": "string",
"asset_location": "string",
"default_asset_thumbnail": "string",
"created_at": "2024-05-09T11:15:19.065Z",
"updated_at": "2024-05-09T11:15:19.065Z",
"deleted_at": "2024-05-09T11:15:19.065Z",
"created_by_name": "string",
"created_by_user_id": "string",
"created_by_user_type": "string",
"updated_by_name": "string",
"deleted_by_name": "string",
"is_latest_version": false,
"is_deleted": false,
"is_private": false,
"is_lga": "string",
"source": "string",
"tags": [
"string"
],
"kvp": {},
"taxonomy": [
{
"uuid": "string",
"title": "string"
}
],
"folders": [
"string"
],
"repos": [
"string"
],
"media": {
"height": 0,
"width": 0,
"audio_video_duration": 0,
"audio_description_text": "string",
"alt_text": "string",
"thumbnail": "string",
"streamingDetails": {
"resolution": "string",
"url": "string",
"label": "string"
},
"transcriptionDetails": {
"language": "string",
"url": "string",
"label": "string"
}
},
"usage_count": 0,
"license_expiration_date": "2024-05-09T11:15:19.065Z",
"license_validity": true,
"chunk_metadata": {}
}
}
Responses:
Status Code | Description | Content-Type |
---|---|---|
200 | Successful Response | application/json |
404 | Object not found | application/json |
400 | Bad Request | application/json |
500 | Internal server error | application/json |
422 | Validation Error | application/json |
- 200 (Successful Response): This response indicates that the file for the object was successfully updated.
- 404 (Object not found): This response indicates that the specified object ID was not found in the repository.
- 400 (Bad Request): This response indicates that there was a problem with the request syntax or parameters.
- 500 (Internal server error): This response indicates an unexpected server error occurred.
- 422 (Validation Error): This response indicates that there are validation errors with the request parameters.
Search Chunks API
/cl/api/v1/chunks/search
Method:
POST
Summary: Get All Chunks From The Repository
Description: Return a list of all the chunks that are present in the object repository.
Operation ID: Get_all_chunks_from_the_repository_cl_api_v1_chunks_search_post
Request Payload:
Type | Parameter | Description | Data Type | is_optional |
---|---|---|---|---|
Parameter | start | Specifies the page number to retrieve (1-based index). | int | mandatory |
Parameter | page_size | Specifies the number of items per page. | int | mandatory |
sample code
import requests
URL = "https://api.kadal.ai/cl/api/v1/chunks/search"
# sample python code
headers = { "Authorization ": "Bearer 1234567890" }
params={
"start":int,
"page_size":int,
}
response = requests.post(URL, headers=headers,params=params)
print(response)
Example response -
{
"message": "string",
"total": 0,
"data": [
{
"lor_object_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"object_version": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"chunk_id": "string",
"text": "string",
"object_vector": [
0
],
"metadata": {}
}
]
}
Responses:
Status Code | Description | Content-Type |
---|---|---|
200 | Successful Response | application/json |
404 | Object chunk not found | application/json |
400 | Bad Request | application/json |
500 | Internal server error | application/json |
422 | Validation Error | application/json |
- 200 (Successful Response): This response indicates that the search for chunks was successful, and it returns the list of chunks.
- 404 (Object chunk not found): This response indicates that no chunks were found in the repository.
- 400 (Bad Request): This response indicates that there was a problem with the request syntax or parameters.
- 500 (Internal server error): This response indicates an unexpected server error occurred.
- 422 (Validation Error): This response indicates that there are validation errors with the request parameters.
Get Object Chunk Details API
/cl/api/v1/chunks/{chunk_id}
- Method:
GET
- Summary: Get Object Details For An Object Chunk Id
- Description: Return details for an object chunk from the object repository for the specified chunk id.
- Operation ID: Get_Object_details_for_an_object_chunk_Id_cl_api_v1_chunkschunk_idget
Request Payload:
Type | Parameter | Description | Data Type | is_optional |
---|---|---|---|---|
Parameter | chunk_id | chunk_id of an existing object. | string | mandatory |
sample code
import requests
URL = "https://api.kadal.ai/cl/api/v1/chunks/{chunk_id}"
# sample python code
headers = { "Authorization ": "Bearer 1234567890" }
params={
"chunk_id":"string"
}
response = requests.get(URL, headers=headers,params=params)
print(response)
Example response -
{
"message": "string",
"total": 0,
"data": {
"lor_object_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"object_version": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"chunk_id": "string",
"text": "string",
"object_vector": [
0
],
"metadata": {}
}
}
Responses:
Status Code | Description | Content-Type |
---|---|---|
200 | Successful Response | application/json |
404 | Object chunk not found | application/json |
400 | Bad Request | application/json |
500 | Internal server error | application/json |
422 | Validation Error | application/json |
- 200 (Successful Response): This response indicates that the chunk details were successfully retrieved, and it returns the details in JSON format.
- 404 (Object chunk not found): This response indicates that the specified object chunk was not found in the repository.
- 400 (Bad Request): This response indicates that there was a problem with the request syntax or parameters.
- 500 (Internal server error): This response indicates an unexpected server error occurred.
- 422 (Validation Error): This response indicates that there are validation errors with the request parameters.
Update Object Chunk API
/cl/api/v1/chunks/{chunk_id}
Method:
PUT
Summary: Update A Object Chunk In The Repository
Description: Update the latest version of an object chunk in the object repository.
Operation ID: Update_a_object_chunk_in_the_repository_cl_api_v1_chunkschunk_idput
Request Payload:
Type | Parameter | Description | Data Type | is_optional |
---|---|---|---|---|
Parameter | chunk_id | Chunk id of an existing object to be updated | string | mandatory |
Parameter | text | text to be update | string | mandatory |
Parameter | metadata | metadata to be update | string | mandatory |
sample code
import requests
URL = "https://api.kadal.ai/cl/api/v1/chunks/{chunk_id}"
# sample python code
headers = { "Authorization ": "Bearer 1234567890" }
params={
"chunk_id":"string",
"text":"string",
"metadata":"string"
}
response = requests.put(URL, headers=headers,params=params)
print(response)
Example response -
{
"message": "string",
"data": {
"lor_object_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"object_version": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"chunk_id": "string",
"text": "string",
"object_vector": [
0
],
"metadata": {}
}
}
Responses:
Status Code | Description | Content-Type |
---|---|---|
200 | Successful Response | application/json |
422 | Validation Error | application/json |
- 200 (Successful Response): This response indicates that the object chunk was successfully updated in the repository.
- 422 (Validation Error): This response indicates that there are validation errors with the request parameters.
Delete Object Chunk API
/cl/api/v1/chunks/{chunk_id}
Method:
DELETE
Summary: Delete A Object Chunk From The Repository
Description: Delete a specific chunk from the object repository.
Operation ID: Delete_a_object_chunk_from_the_repository_cl_api_v1_chunkschunk_iddelete
Request Payload:
Type | Parameter | Description | Data Type | is_optional |
---|---|---|---|---|
Parameter | chunk_id | Chunk id of an existing object to be updated | string | mandatory |
sample code
import requests
URL = "https://api.kadal.ai/cl/api/v1/chunks/{chunk_id}"
# sample python code
headers = { "Authorization ": "Bearer 1234567890" }
params={
"chunk_id":"string",
}
response = requests.delete(URL, headers=headers,params=params)
print(response)
Example response -
{
"message": "string",
"data": {
"lor_object_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"object_version": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"chunk_id": "string",
"text": "string",
"object_vector": [
0
],
"metadata": {}
}
}
Responses:
Status Code | Description | Content-Type |
---|---|---|
200 | Successful Response | application/json |
404 | Object chunk not found | application/json |
400 | Bad Request | application/json |
500 | Internal server error | application/json |
422 | Validation Error | application/json |
- 200 (Successful Response): This response indicates that the object chunk was successfully deleted from the repository.
- 404 (Object chunk not found): This response indicates that the specified object chunk was not found in the repository.
- 400 (Bad Request): This response indicates that there was a problem with the request syntax or parameters.
- 500 (Internal server error): This response indicates an unexpected server error occurred.
- 422 (Validation Error): This response indicates that there are validation errors with the request parameters.
Create Object Chunk API
/cl/api/v1/chunks/
- Method:
POST
- Summary: Create A New Object Chunk In The Repository
- Description: Create a new object chunk in the object repository.
- Operation ID: Create_a_new_object_chunk_in_the_repository_cl_api_v1_chunks__post
Request Payload:
Type | Parameter | Description | Data Type | is_optional |
---|---|---|---|---|
query Parameter | object_id | ID of the created chunk | string | mandatory |
query Parameter | version_id | ID of the created chunk | string | mandatory |
query Parameter | text | Updated text content or value of the object | string | mandatory |
query Parameter | metadata | Additional metadata associated with the object | string | mandatory |
sample code
import requests
URL = "https://api.kadal.ai/cl/api/v1/chunks/"
# sample python code
headers = { "Authorization ": "Bearer 1234567890" }
params={
"object_id":"string",
"version_id":"string",
"text":"string",
"metadata":"string"
}
response = requests.post(URL, headers=headers,params=params)
print(response)
Example response -
{
"message": "string",
"data": {
"lor_object_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"object_version": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"chunk_id": "string",
"text": "string",
"object_vector": [
0
],
"metadata": {}
}
}
Responses:
Status Code | Description | Content-Type |
---|---|---|
200 | Successful Response | application/json |
404 | Object chunk not found | application/json |
400 | Bad Request | application/json |
500 | Internal server error | application/json |
422 | Validation Error | application/json |
- 200 (Successful Response): This response indicates that the object chunk was successfully created in the repository.
- 404 (Object chunk not found): This response indicates that the specified object chunk was not found.
- 400 (Bad Request): This response indicates that there was a problem with the request syntax or parameters.
- 500 (Internal server error): This response indicates an unexpected server error occurred.
- 422 (Validation Error): This response indicates that there are validation errors with the request parameters.
Create Object Chunks in Bulk API
/cl/api/v1/chunks/bulk
Method:
POST
Summary: Create Object Chunks In Bulk In The Repository
Description: Create multiple object chunks in bulk in the object repository.
Operation ID: Create_object_chunks_in_bulk_in_the_repository_cl_api_v1_chunks_bulk_post
Request Payload:
Type | Parameter | Description | Data Type | is_optional |
---|---|---|---|---|
Request | chunks | Array of chunks containing document information | array | mandatory |
object_id | ID of the document object | string | mandatory | |
version_id | ID of the document version | string | mandatory | |
text | Text content of the chunk | string | mandatory | |
metadata | Additional metadata for the chunk | object | mandatory |
sample code
import requests
URL = "https://api.kadal.ai/cl/api/v1/chunks/bulk"
# sample python code
headers = { "Authorization ": "Bearer 1234567890" }
params={
"chunks":"array"
"object_id":"string",
"version_id":"string",
"text":"string",
"metadata":"string"
}
response = requests.post(URL, headers=headers,params=params)
print(response)
Example response -
{
"message": "string",
"data": [
{
"lor_object_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"object_version": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"chunk_id": "string",
"text": "string",
"object_vector": [
0
],
"metadata": {}
}
]
}
Responses:
Status Code | Description | Content-Type |
---|---|---|
200 | Successful Response | application/json |
404 | Object chunk not found | application/json |
400 | Bad Request | application/json |
500 | Internal server error | application/json |
422 | Validation Error | application/json |
- 200 (Successful Response): This response indicates that the object chunks were successfully created in the repository.
- 404 (Object chunk not found): This response indicates that one or more object chunks were not found.
- 400 (Bad Request): This response indicates that there was a problem with the request syntax or parameters.
- 500 (Internal server error): This response indicates an unexpected server error occurred.
- 422 (Validation Error): This response indicates that there are validation errors with the request parameters.
Get Root Directory Information API
/cl/api/v1/directory/root
- Method:
GET
- Summary: Get Root Directory Information For A Specific Tenant
- Description: This API returns the root directory information for a tenant (if exists).
- Operation ID: Get_root_directory_information_for_a_specific_tenant_cl_api_v1_directory_root_get
sample code
import requests
URL = "https://api.kadal.ai/cl/api/v1/directory/root"
# sample python code
headers = { "Authorization ": "Bearer 1234567890" }
params={
"ext_user_id_ref":"array"
}
response = requests.get(URL, headers=headers,params=params)
print(response)
Responses:
Status Code | Description | Content-Type |
---|---|---|
200 | Root directory found | application/json |
404 | Not found | application/json |
400 | Connection error | application/json |
500 | Internal server error | application/json |
422 | Validation Error | application/json |
- 200 (Root directory found): This response indicates that the root directory information for the specified tenant was found.
- 404 (Not found): This response indicates that the root directory for the specified tenant does not exist.
- 400 (Connection error): This response indicates a connection error occurred.
- 500 (Internal server error): This response indicates an unexpected server error occurred.
- 422 (Validation Error): This response indicates that there are validation errors with the request parameters.
Create Root Directory API
/cl/api/v1/directory/root
- Method:
POST
- Summary: Create A Root Directory For A Tenant
- Description: This API creates a root directory for a tenant. The root directory will be named as root_{tenant_code}. On success, this API returns the folder_id of the root directory that was created.
- Operation ID: Create_a_root_directory_for_a_tenant_cl_api_v1_directory_root_post
sample code
import requests
URL = "https://api.kadal.ai/cl/api/v1/directory/root"
# sample python code
headers = { "Authorization ": "Bearer 1234567890" }
params={
"ext_user_id_ref":"string"
}
response = requests.post(URL, headers=headers,params=params)
print(response)
Responses:
Status Code | Description | Content-Type |
---|---|---|
201 | Successfully created | application/json |
409 | Conflict | application/json |
400 | Connection error | application/json |
500 | Internal server error | application/json |
422 | Validation Error | application/json |
- 201 (Successfully created): This response indicates that the root directory for the tenant was successfully created.
- 409 (Conflict): This response indicates a conflict occurred (e.g., root directory already exists for the tenant).
- 400 (Connection error): This response indicates a connection error occurred.
- 500 (Internal server error): This response indicates an unexpected server error occurred.
- 422 (Validation Error): This response indicates that there are validation errors with the request parameters.
Get Folder Information API
/cl/api/v1/directory/{folder_id}
- Method:
GET
- Summary: Get Folder Information For A Specific Directory
- Description: Retrieve folder information for a specific folder identified by
folder_id
within a tenant. This API displays information about all children present inside the requested directory. - Operation ID: Get_folder_information_for_a_specific_directory_cl_api_v1_directoryfolder_idget
sample code
import requests
URL = "https://api.kadal.ai/cl/api/v1/directory/{folder_id}"
# sample python code
headers = { "Authorization ": "Bearer 1234567890" }
params={
"folder_id":"string"
"ext_user_id_ref":"string"
}
response = requests.get(URL, headers=headers,params=params)
print(response)
Responses:
Status Code | Description | Content-Type |
---|---|---|
200 | Directory found | application/json |
404 | Not found | application/json |
400 | Connection error | application/json |
500 | Internal server error | application/json |
422 | Validation Error | application/json |
- 200 (Directory found): This response indicates that the requested directory information was found and is returned in the response body.
- 404 (Not found): This response indicates that the requested directory does not exist.
- 400 (Connection error): This response indicates a connection error occurred.
- 500 (Internal server error): This response indicates an unexpected server error occurred.
- 422 (Validation Error): This response indicates that there are validation errors with the request parameters.
Update Directory Metadata API
/cl/api/v1/directory/{folder_id}
Method:
PUT
Summary: Update Metadata Of A Directory
Description: This API updates metadata of a directory that is not the root directory. It should not be used for adding new children to an existing directory. If you want to create a new set of directory structure, use the DELETE API to delete the existing directory structure first, then use the POST API to create the new structure.
Operation ID: Update_metadata_of_a_directory_cl_api_v1_directoryfolder_idput
sample code
import requests
URL = "https://api.kadal.ai/cl/api/v1/directory/{folder_id}"
# sample python code
headers = { "Authorization ": "Bearer 1234567890" }
params={
"folder_id":"string"
"ext_user_id_ref":"string"
}
response = requests.put(URL, headers=headers,params=params)
print(response)
Responses:
Status Code | Description | Content-Type |
---|---|---|
200 | Successfully updated | application/json |
403 | Forbidden | application/json |
404 | Not found | application/json |
409 | Conflict | application/json |
400 | Connection error | application/json |
500 | Internal server error | application/json |
422 | Validation Error | application/json |
- 200 (Successfully updated): This response indicates that the directory metadata was successfully updated.
- 403 (Forbidden): This response indicates that the update operation is forbidden due to permissions.
- 404 (Not found): This response indicates that the specified directory does not exist.
- 409 (Conflict): This response indicates a conflict occurred (e.g., conflicting updates).
- 400 (Connection error): This response indicates a connection error occurred.
- 500 (Internal server error): This response indicates an unexpected server error occurred.
- 422 (Validation Error): This response indicates that there are validation errors with the request parameters.
Add Directories API
/cl/api/v1/directory/{folder_id}
- Method:
POST
- Summary: Add Single Or Multiple Directories To An Existing Directory
- Description: Add one or more directories to a parent directory. The parent directory can be a root directory or any other existing directory. This API allows creating a complete directory structure with nested children directories under a root directory or adding one or more children to any existing parent directory. Each directory name at a certain level must be unique.
- Operation ID: Add_Single_or_Multiple_directories_to_an_existing_directory_cl_api_v1_directoryfolder_idpost
sample code
import requests
URL = "https://api.kadal.ai/cl/api/v1/directory/{folder_id}"
# sample python code
headers = { "Authorization ": "Bearer 1234567890" }
params={
"directory_structure": [
{
"name": "Folder 1",
"is_private": False,
"type": "Folder",
"children": [],
"custom_metadata": {
"kvp": {
"key1": "value1"
},
"tags": [
"tag1"
],
"taxonomy": [
{
"uuid": "value1",
"title": "value2"
}
]
}
}
]
}
response = requests.post(URL, headers=headers,params=params)
print(response)
Responses:
Status Code | Description | Content-Type |
---|---|---|
201 | Successfully added | application/json |
206 | Partially added | application/json |
400 | Connection error | application/json |
404 | Not found | application/json |
409 | Conflict | application/json |
500 | Internal server error | application/json |
422 | Validation Error | application/json |
- 201 (Successfully added): This response indicates that the directories were successfully added.
- 206 (Partially added): This response indicates that some directories were added successfully, but not all.
- 400 (Connection error): This response indicates a connection error occurred.
- 404 (Not found): This response indicates that the specified parent directory (
folder_id
) was not found. - 409 (Conflict): This response indicates a conflict occurred, such as duplicate directory names at a certain level.
- 500 (Internal server error): This response indicates an unexpected server error occurred.
- 422 (Validation Error): This response indicates that there are validation errors with the request parameters.
Note: Ensure that each directory name at a certain level is unique to avoid conflicts when using this API.
Delete Directory API
/cl/api/v1/directory/{folder_id}
- Method:
DELETE
- Summary: Delete A Directory
- Description: Use this API to delete a directory (other than a root directory) and all its underlying directories (if they exist). Calling this API will delete all children directories (if they exist).
- Operation ID: Delete_a_directory_cl_api_v1_directoryfolder_iddelete
sample python code
import requests
URL = "https://api.kadal.ai/cl/api/v1/directory/{folder_id}"
headers = { "Authorization ": "Bearer 1234567890" }
params={
"folder_id":"string"
}
Responses:
Status Code | Description | Content-Type |
---|---|---|
200 | Successfully deleted | application/json |
403 | Forbidden | application/json |
404 | Child doesn't exist | application/json |
400 | Connection error | application/json |
500 | Internal server error | application/json |
422 | Validation Error | application/json |
- 200 (Successfully deleted): This response indicates that the directory and its children (if any) were successfully deleted.
- 403 (Forbidden): This response indicates that the deletion is forbidden, likely due to permission issues.
- 404 (Child doesn't exist): This response indicates that the specified directory (
folder_id
) or its children do not exist. - 400 (Connection error): This response indicates a connection error occurred.
- 500 (Internal server error): This response indicates an unexpected server error occurred.
- 422 (Validation Error): This response indicates that there are validation errors with the request parameters.
Note: Calling this API will delete the specified directory (folder_id
) and all its children directories recursively (if they exist). Use caution when using this API as it permanently removes directories and their contents.
Components
Schemas
Body_Update_a_new_version_file_for_object_in_the_object_repositorycl_api_v1_objectsobject_idversionsversion_id__uploadfile_put
- Type: object
- Description:
- Properties:
- file:
- Type: string
- Format: binary
- Description: File to be uploaded in the repository
- file:
Body_Update_the_file_for_object_in_the_object_repositorycl_api_v1_objectsobject_id__uploadfile_put
- Type: object
- Description:
- Properties:
- file:
- Type: string
- Format: binary
- Description: File to be uploaded in the repository against an existing object.
- file:
BulkVectorObject
- Type: object
- Description:
- Properties:
- object_id:
- Type: string
- Format: uuid
- version_id:
- Type: string
- Format: uuid
- text:
- Type: string
- metadata:
- object_id:
ChildItem
- Type: object
- Description:
- Properties:
- name:
- Type: string
- is_private:
- Type: boolean
- type:
- children:
- Type: array
- name:
ChildItemCreateModel
- Type: object
- Description:
- Properties:
- directory_structure:
- Type: array
- directory_structure:
ChildItemUpdatePayloadModel
- Type: object
- Description:
- Properties:
- name:
- Type: string
- is_private:
- Type: boolean
- type:
- name:
ChunkSearchRequest
- Type: object
- Description:
- Properties:
- metadata:
- Type: object
- metadata:
ChunkSearchResponse
- Type: object
- Description:
- Properties:
- message:
- Type: string
- total:
- Type: integer
- data:
- message:
ChunkSearchesResponse
- Type: object
- Description:
- Properties:
- message:
- Type: string
- total:
- Type: integer
- data:
- Type: array
- message:
CoreObject_Update
- Type: object
- Description:
- Properties:
- version_label:
- Type: string
- object_type:
- Type: string
- title:
- Type: string
- description:
- Type: string
- uri:
- Type: string
- is_private:
- Type: boolean
- is_lga:
- Type: string
- source:
- Type: string
- tags:
- Type: array
- kvp:
- Type: object
- taxonomy:
- Type: array
- folders:
- Type: array
- repos:
- Type: array
- license_expiration_date:
- Type: string
- Format: date-time
- license_validity:
- Type: boolean
- chunk_metadata:
- Type: object
- version_label:
HTTPValidationError
- Type: object
- Description:
- Properties:
- detail:
- Type: array
- detail:
Media
- Type: object
- Description:
- Properties:
- height:
- Type: integer
- width:
- Type: integer
- audio_video_duration:
- Type: number
- audio_description_text:
- Type: string
- alt_text:
- Type: string
- thumbnail:
- Type: string
- streamingDetails:
- transcriptionDetails:
- height:
MediaMetadata
- Type: object
- Description:
- Properties:
- height:
- Type: integer
- width:
- Type: integer
- audio_video_duration:
- Type: number
- audio_description_text:
- Type: string
- alt_text:
- Type: string
- thumbnail:
- Type: string
- streamingDetails:
- transcriptionDetails:
- additional_metadata:
- Type: object
- height:
MediaObject
- Type: object
- Description:
- Properties:
- object_id:
- Type: string
- Format: uuid
- version_id:
- Type: string
- Format: uuid
- version_no:
- Type: integer
- version_label:
- Type: string
- tenant_id:
- Type: string
- Format: uuid
- object_type:
- Type: string
- title:
- Type: string
- description:
- Type: string
- file_name:
- Type: string
- file_extension:
- Type: string
- size:
- Type: integer
- asset_location:
- Type: string
- mimetype:
- Type: string
- default_asset_thumbnail:
- Type: string
- created_by_user_id:
- Type: string
- created_by_user_type:
- Type: string
- created_at:
- Type: string
- Format: date-time
- updated_at:
- Type: string
- Format: date-time
- deleted_at:
- Type: string
- Format: date-time
- media_metadata:
- created_by_name:
- Type: string
- updated_by_name:
- Type: string
- deleted_by_name:
- Type: string
- source:
- Type: string
- tags:
- Type: array
- kvp:
- Type: object
- taxonomy:
- Type: object
- folders:
- Type: array
- repos:
- Type: array
- is_private:
- Type: boolean
- is_latest_version:
- Type: boolean
- is_lga:
- Type: string
- is_deleted:
- Type: boolean
- license_expiration_date:
- Type: string
- Format: date-time
- license_validity:
- Type: boolean
- object_id:
Msg
- Type: object
- Description:
- Properties:
- msg:
- Type: string
- msg:
Object
- Type: object
- Description:
- Properties:
- object_id:
- Type: string
- Format: uuid
- version_id:
- Type: string
- Format: uuid
- version_no:
- Type: number
- version_label:
- Type: string
- tenant_id:
- Type: string
- Format: uuid
- object_type:
- Type: string
- title:
- Type: string
- description:
- Type: string
- file_name:
- Type: string
- file_extension:
- Type: string
- size:
- Type: number
- mimetype:
- Type: string
- uri:
- Type: string
- asset_location:
- Type: string
- default_asset_thumbnail:
- Type: string
- created_at:
- Type: string
- Format: date-time
- updated_at:
- Type: string
- Format: date-time
- deleted_at:
- Type: string
- Format: date-time
- created_by_name:
- Type: string
- created_by_user_id:
- Type: string
- created_by_user_type:
- Type: string
- updated_by_name:
- Type: string
- deleted_by_name:
- Type: string
- is_latest_version:
- Type: boolean
- is_deleted:
- Type: boolean
- is_private:
- Type: boolean
- is_lga:
- Type: string
- source:
- Type: string
- tags:
- Type: array
- kvp:
- Type: object
- taxonomy:
- Type: array
- folders:
- Type: array
- repos:
- Type: array
- media:
- usage_count:
- Type: integer
- license_expiration_date:
- Type: string
- Format: date-time
- license_validity:
- Type: boolean
- chunk_metadata:
- Type: object
- object_id:
ObjectNew
- Type: object
- Description:
- Properties:
- code:
- Type: string
- version_label:
- Type: string
- object_type:
- title:
- Type: string
- description:
- Type: string
- file_name:
- Type: string
- file_extension:
- Type: string
- uri:
- Type: string
- tags:
- Type: array
- kvp:
- Type: object
- taxonomy:
- Type: array
- repos:
- Type: array
- folders:
- Type: array
- source:
- Type: string
- is_private:
- Type: boolean
- is_lga:
- Type: string
- is_latest_version:
- Type: boolean
- is_deleted:
- Type: boolean
- license_expiration_date:
- Type: string
- Format: date-time
- license_validity:
- Type: boolean
- created_by_name:
- Type: string
- metadata:
- Type: object
- code:
ObjectResponse
- Type: object
- Description:
- Properties:
- status:
- Type: string
- message:
- Type: string
- data:
- status:
ObjectType
- Type: string
- Description: An enumeration.
- Properties:
ObjectsSearchResponse
- Type: object
- Description:
- Properties:
- message:
- Type: string
- data:
- message:
ReponseModelView
- Type: object
- Description:
- Properties:
- status_code:
- message:
- Type: string
- data:
- Type: array
ResponseModelBase
- Type: object
- Description:
- Properties:
- status_code:
- message:
- Type: string
ResponseModelCreate
- Type: object
- Description:
- Properties:
- status_code:
- message:
- Type: string
- folder_id:
- Type: string
RootDirectoryPayload
- Type: object
- Description:
- Properties:
- tenant_code:
- Type: string
- tenant_code:
SearchRecord
- Type: object
- Description:
- Properties:
- object_id:
- Type: string
- Format: uuid
- version_id:
- Type: string
- Format: uuid
- version_no:
- Type: number
- version_label:
- Type: string
- tenant_id:
- Type: string
- Format: uuid
- object_type:
- Type: string
- title:
- Type: string
- description:
- Type: string
- file_name:
- Type: string
- file_extension:
- Type: string
- size:
- Type: number
- mimetype:
- Type: string
- uri:
- Type: string
- asset_location:
- Type: string
- default_asset_thumbnail:
- Type: string
- created_at:
- Type: string
- Format: date-time
- updated_at:
- Type: string
- Format: date-time
- deleted_at:
- Type: string
- Format: date-time
- created_by_name:
- Type: string
- created_by_user_id:
- Type: string
- created_by_user_type:
- Type: string
- updated_by_name:
- Type: string
- deleted_by_name:
- Type: string
- is_latest_version:
- Type: boolean
- is_deleted:
- Type: boolean
- is_private:
- Type: boolean
- is_lga:
- Type: string
- source:
- Type: string
- tags:
- Type: array
- kvp:
- Type: object
- taxonomy:
- Type: array
- folders:
- Type: array
- repos:
- Type: array
- media:
- usage_count:
- Type: integer
- license_expiration_date:
- Type: string
- Format: date-time
- license_validity:
- Type: boolean
- chunk_metadata:
- Type: object
- score:
- Type: number
- content:
- Type: string
- object_id:
SearchResponse
- Type: object
- Description:
- Properties:
- total:
- Type: integer
- records:
- Type: array
- aggregations:
- Type: object
- total:
Taxonomy
- Type: object
- Description:
- Properties:
- uuid:
- Type: string
- title:
- Type: string
- uuid:
Types
- Type: string
- Description: An enumeration.
- Properties:
ValidationError
- Type: object
- Description:
- Properties:
- loc:
- Type: array
- msg:
- Type: string
- type:
- Type: string
- loc:
VectorObject
- Type: object
- Description:
- Properties:
- lor_object_id:
- Type: string
- Format: uuid
- object_version:
- Type: string
- Format: uuid
- tenant_id:
- Type: string
- Format: uuid
- chunk_id:
- Type: string
- text:
- Type: string
- object_vector:
- Type: array
- metadata:
- Type: object
- lor_object_id:
VectorObjectNew
- Type: object
- Description:
- Properties:
- object_id:
- Type: string
- Format: uuid
- version_id:
- Type: string
- Format: uuid
- text:
- Type: string
- metadata:
- Type: object
- object_id:
VectorObjectResponse
- Type: object
- Description:
- Properties:
- message:
- Type: string
- data:
- message:
VectorObjectResponses
- Type: object
- Description:
- Properties:
- message:
- Type: string
- data:
- Type: array
- message:
VectorObjectUpdate
- Type: object
- Description:
- Properties:
- text:
- Type: string
- metadata:
- Type: object
- text:
VectorObjectsNew
- Type: object
- Description:
- Properties:
- chunks:
- Type: array
- chunks:
appmodelcoreobject__StreamingDetails
- Type: object
- Description:
- Properties:
- resolution:
- Type: string
- url:
- Type: string
- label:
- Type: string
- resolution:
appmodelcoreobject__TranscriptionDetails
- Type: object
- Description:
- Properties:
- language:
- Type: string
- url:
- Type: string
- label:
- Type: string
- language:
appschemaspydantic_schemasmedia_filesStreamingDetails
- Type: object
- Description:
- Properties:
- resolution:
- Type: string
- url:
- Type: string
- label:
- Type: string
- resolution:
appschemaspydantic_schemasmedia_filesTranscriptionDetails
- Type: object
- Description:
- Properties:
- language:
- Type: string
- url:
- Type: string
- label:
- Type: string
- language: